﻿using System;

class LastDigitInEnglish
{
    //Exercise 3.
    //Write a method that returns the last digit of given integer as an English word. 
    //Examples: 512 -> "two", 1024 -> "four", 12309 -> "nine".

    static void Main()
    {
        Console.Write("Enter an integer: ");
        int number = int.Parse(Console.ReadLine());

        LastDigit(number);
    }

    private static void LastDigit(int number)
    {
        int lastDigit = number % 10;

        string[] digit = new string[] { "zero", "one", "two", "three", "four", 
                                        "five", "six", "seven", "eight", "nine" };
        Console.WriteLine(digit[lastDigit]);
        Console.WriteLine();
    }
}

